home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- ##########################################################################
- # #
- # #
- # This script is for adding lists to Listserv 6.0b, though it may work #
- # for other lists. It is also intended to work with NCSU's sendmail.cf #
- # which requires the listserv.addresses file. #
- # #
- # Written by djbarnes@tx.ncsu.edu on 3/29/94 #
- # Feel free to redistribute if you can use it! #
- # #
- # #
- ##########################################################################
-
-
- # Determine how echo suppresses new-line
- echo "a\c" > /tmp/echo
- if [ "`grep c /tmp/echo`" = "a\c" ]; then
- n='-n'
- c=''
- else
- n=''
- c='\c'
- fi
- rm /tmp/echo
-
- echo "******************************************************************"
- echo "This script is used to add lists to the current listserv database."
- echo "******************************************************************"
- echo ""
- echo "This script modifies the following files:"
- echo "./owners -- the file that names the owners of each list"
- echo "./config -- the config file for listserv"
- echo "./listserv.addresses -- the file that sendmail.cf uses to find the addresses"
- echo
- echo
- echo
-
-
- echo $n "Please enter the name of the list to be added: $c"
- read name
-
- echo $n "Please enter the email address of the list owner: $c"
- read owner
-
- echo $n "Please enter a password for the list (no white space, please): $c"
- read password
-
- echo "Please enter a one line comment for the list: "
- read comment
-
- echo
- echo "The name of the list you entered is: " $name
- echo "The email address of the list owner is: " $owner
- echo "The password you entered is: " $password
- echo "and the comment you entered is: " $comment
- echo
-
-
- echo $n "Are you sure you want to make those additions? [y] $c"
- read y
-
- if [ "$y" = "n" -o "$y" = "N" ]; then
- echo "Nothing changed. Please Re-run the addlist script to make changes."
- exit 0
- else
- echo "Making changes...."
- fi
-
- # This line takes care of the owners file
- echo $owner $name "CCERRORS CCLISTS" >> owners
-
- # This line takes care of the listserv.addresses file
- echo $name >> listserv.addresses
-
- # The rest of this is for the config file
- echo "" >> config
- echo "#" >> config
- echo "# "$comment >> config
- echo "#" >> config
- echo "list "$name $name"@tx.ncsu.edu" $owner $password "-P -s -p -m 25" >> config
- echo "comment "$name "#"$comment >> config
-
- echo "List addition complete."
- echo "Would you like to restart listserv so that the changes take effect?"
- echo $n "[y] $c"
- read x
-
- if [ "$x" = "n" -o "$x" = "N" ]; then
- echo "Please remember, you must restart listserv for the changes to take effect."
- exit 0
- else
- start_listserv
- fi
-
- exit 0
-
-
-